package icasue.net.socket.model.event;

import icasue.net.socket.thread.SocketProxy;
import icasue.net.socket.model.register.RegisterInfo;
import icasue.net.protocol.carfun.commands.EventCommand;


/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/3/22 下午3:44
 * @UpdateDate:
 * @Description: 存在于channel消息池中的消息单元，组成单元：
 * 1.客户端的注册信息的identity
 * 2.变更指令Command
 * 3.变更上行的数据.
 */
public class PoolMesItem<T> {
    private RegisterInfo registerInfo;
    private SocketProxy socketProxy;
    private EventCommand command;
    private T data;

    public PoolMesItem(){ }

    public PoolMesItem(RegisterInfo registerInfo,SocketProxy socketProxy,EventCommand command,T data){
        this.registerInfo = registerInfo;
        this.socketProxy = socketProxy;
        this.command = command;
        this.data = data;
    }

    public RegisterInfo getRegisterInfo() {
        return registerInfo;
    }

    public void setRegisterInfo(RegisterInfo registerInfo) {
        this.registerInfo = registerInfo;
    }

    public SocketProxy getSocketProxy() {
        return socketProxy;
    }

    public void setSocketProxy(SocketProxy socketProxy) {
        this.socketProxy = socketProxy;
    }

    public EventCommand getCommand() {
        return command;
    }

    public void setCommand(EventCommand command) {
        this.command = command;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
